<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/common.jsp"%>

<%

	ArrayList List1 = new ArrayList();
	ArrayList List2 = new ArrayList();
	ArrayList List3 = new ArrayList();
	//菜单1
	List1.add("当日在岗情况");
	List2.add("/ReportServer?reportlet=/suaee/01_hrm/01_kaoqin/05_hrm_duty.cpt");
	List3.add("10");
	//菜单2
	List1.add("会议室占用情况");
	List2.add("/schedule/timeline.jsp?workflowid=40895a003614243d0136155ccd6901ab");
	List3.add("10");
	//菜单3
	List1.add("车辆占用情况");
	List2.add("/schedule/timeline.jsp?workflowid=402881e435fba4990135fbf2366d00a1");
	List3.add("70");
	//菜单4
	List1.add("交易情况");
	List2.add("/ReportServer?reportlet=/suaee/06_report/gptj-2.cpt&op=write");
	List3.add("70");
	//菜单5
	List1.add("工作日志");
	List2.add("/schedule/schedule.jsp?ismy=1&formid=ut_worklogty&reportid=4028df2d39fbc0f90139fc65d3790363&allsub=1");
	List3.add("70");
	//菜单6
	List1.add("任务安排");
	List2.add("/reportdata.do?action=search&reportid=48f5f3ec398ee43b013990a02a200354");
	List3.add("70");
	//菜单7
	List1.add("内部协调");
	List2.add("/reportdata.do?action=search&reportid=4028df2d39d6ebfc0139d729f61600b9");
	List3.add("70");	
	//菜单8
	List1.add("人事考核");
	List2.add("");
	List3.add("70");
	//菜单9
	List1.add("公文统计");
	List2.add("/ReportServer?reportlet=/suaee/02_office/fawenSum.cpt");
	List3.add("70");
	//菜单10
	List1.add("财务报销");
	List2.add("");
	List3.add("80");

	//显示几列？
	int col=2;
	int colwidth=100/col;

	//行数平均分布
	int menucount=0;
	for(int i=0;i<List1.size();i++){
		int v=Integer.parseInt((String)List3.get(i));
		if(loginUser.getSeclevel()>=Integer.parseInt((String)List3.get(i))){
			menucount++;
		}
	}
	int rownum=0;
	if(menucount>0){
		rownum=((double)menucount/(double)col)> (menucount/col)?menucount/col+1:menucount/col;
	}

	//System.out.println(loginUser.getSeclevel());
	
	int jsq=0;

%>
<html>
<head>

    <link href="/ReportServer?op=emb&resource=finereport.css" rel="stylesheet" type="text/css"/>
    <%@ include file="/common/head.jsp" %>
</head>
<body style="margin-left:10px;">
<table width="100%">

	<tr>
	<% for(int i=0;i<col;i++){ %>
        <td width="<%=colwidth%>%">
        <table id="tb01" class="x-table">
            <tr><td>
				<% for(int j=0;j<rownum;j++){ 
					while(jsq<List1.size() && loginUser.getSeclevel()<Integer.parseInt((String)List3.get(jsq))){
						//if(jsq<menucount)
							jsq++;
					}
					if(jsq==List1.size())
						break; 
					else {%>
						<span style="cursor: pointer;" class="celink fh bw pl2 pr2 br0 bbw1 bbss bl0 bt0" align="center" valign="middle" style="width:110px;height:20px;margin-top:3px;color: rgb(0,0,255); border-bottom-color: rgb(192,192,192);" onclick="onUrl('<%=List2.get(jsq)%>','<%=List1.get(jsq)%>')"><%=List1.get(jsq)%></span>
					<%	jsq++;
					}
				}%>
                </td>
			</tr>
        </table>
            </td>
	<% }%>
    </tr>
</table>
</body>
</html>